package com.scnlf.scnlf.portal.core.business.common.controller;

import com.scnlf.scnlf.portal.core.business.common.dto.debug.AppDebugInfoDTO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "debug")
@Slf4j
@RequiredArgsConstructor
public class AppDebugInfoController {


  /**
   * http://localhost:8081/debug/reportTime
   * @return
   */
  @GetMapping(path = "/reportTime")
  public String reportTime(){
    return (AppDebugInfoDTO.endTime - AppDebugInfoDTO.startTime) + "(ms)";
  }

}
